﻿function StaffTimeListController($scope, service, $routeParams, $location, $http) {
    
    $scope.myStore = "";
    ////get data of Staff list
    $http.get(service.locationUrl + "/staffgotgetchecklist/" + service.infoUser.Id, {})
        .success(function (data) {
            $scope.rowsStaffList = data;
            //console.log("aaa" + data);
        })
        .error(function (err) {

            console.log("error", err);
        });

    //get data of Store list api/storelist/1
    $http.get(service.locationUrl + "/companystore/companyid/" + service.infoUser.Id, {})
        .success(function (data) {
            $scope.rowsStoreList = data;
        })
        .error(function (err) {

            console.log("error", err);
        });

    $scope.edit = function (id, stampdate)
    {
        var date = stampdate.toString('yyyy-MMM-dd')
        $location.path("/StaffTimeEdit/" + id).search({
            date: date,
            type: 'forgotCheck',
            });

    }
    /// get data of store
    //$http.get("api/staffworkatDay/", {})
    //    .success(function (data) {
    //        $scope.rowsStore = data;
    //        console.log("aaa" + data);
    //    })
    //    .error(function (err) {

    //        console.log("error", err);
    //    });
}

